package cn.itcast.demo.service;

import cn.itcast.demo.mapper.UserInfoMapper;
import cn.itcast.demo.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class UserService {

    @Autowired
    private UserInfoMapper userInfoMapper;

    public User queryById(Long id){
        // 开始查询
        return this.userInfoMapper.queryUserById(id);
    }

    @Transactional
    public void deleteById(Long id){
        // 开始删除

        System.out.println("删除了： " + id);
    }
}